import Vue from 'vue'
import Router from 'vue-router'


import First from '@/views/First'
import Sceond from '@/views/Second'
import Login from '@/views/login/Index'
import Layout from '@/views/layout/Index'
import Index from '@/views/Index'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '',
      redirect: '/login',
      name: 'main'
    },{
      path: '/login',
      name: 'login',
      component: Login
    },{
     path: '/second',
     name: 'Sceond',
     component: Sceond
    },{
      path: '/layout',
      component: Layout,
      children: [
        {
          path: 'index',
          component: Index,
          name: '首页',
          meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
        },{
          path: '/first',
          name: 'First',
          component: First
        }
      ]
    },
  ]
})
